<template>
	<view class="main">
		<view class="navi-bar">
			<view class="navi-back" @click="goBack">
				<
			</view>
			<view class="navi-title">
				用户协议
			</view>
		</view>
		<u-gap height="100" bgColor="#fff"></u-gap>
		<view class="content" v-html="UserProtocolList">
			{{UserProtocolList}}
		</view>
	</view>
</template>

<script>
	import {
		http
	} from '../../untils/http.js'
	
	const url = 'policy'
	
	export default {
		data() {
			return {
				UserProtocolList: []
			}
		},
		created() {
			http(url).then(res => {
				// console.log(res);
				this.UserProtocolList = res
				console.log(this.UserProtocolList);
			})
		},
		methods: {
			goBack() {
				// 返回上一级并刷新当前页面
				this.$router.go(-1)
			}
		}
	}
</script>

<style lang="scss">
	* {
		box-sizing: border-box;
	}
	
	.main {
		position: relative;
		width: 750rpx;
	}
	
	.navi-bar {
		position: absolute;
		left: -5%;
		top: 0;
		// position: fixed;
		width: 750rpx;
		height: 100rpx;
		line-height: 100rpx;
		z-index: 1000;
		background-color: #fff;
		
		.navi-back {
			margin-left: 15px;
			float: left;
		}
		
		.navi-title {
			margin-right: 28px;
			text-align: center;
		}
	}
	
	.content {
		padding: 10px;
		width: 100%;
		
		/deep/ p {
			margin-top: 5px;
			width: 650rpx;
			font-size: 14px;
		}
	}
</style>
